<?php
$categories = $this->categories;?>
<a href="/mobile/advlist/" data-role="button" data-icon="star" data-iconpos="right" data-theme="b">Добавить объявление</a>
<ul data-role="listview"  data-inset="true" >
    <?php foreach ($categories as $category): ?>
                    <li data-role="list-divider"> <?php echo $category['name'] ?></li>
                        <?php foreach ($category['children'] as $child): ?>
                            <li><a href="/mobile/viewad/id/<?php echo $child['id'] ?>"><?php echo $child['name'] ?></a></li>
                         <?php endforeach; ?>

    <?php endforeach; ?>

 </ul>